#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int a, b, c;
	scanf("%d", &a);

	b = a / 30.48;  //计算英尺foot
	c = (a / 30.48 - b) * 12;  //计算英寸inch

	printf("%d %d", b, c);
	return 0;
}